#ifndef CONFIGURATE_HPP_INCLUDED
#define CONFIGURATE_HPP_INCLUDED

#include <iosfwd>

#define DECLARE_BIT_MASK(enum_, Ty) typedef int Ty

namespace commons { namespace io {
	// TODO fix it
	typedef __int64 offset_type;

	enum open_mode_ {
		mask_ = 0xff 
	};

	enum seek_dir {
		beg, end, cur
	}; 

#define DECLARE_SINK_OPEN_VARS(enum_) \
	static enum_ const bad = (enum_)0x01;\
	static enum_ const text = (enum_)0x02;\
	static enum_ const binary = (enum_)0x04;\
	static enum_ const append = (enum_)0x08;\
	static enum_ const appEnd = (enum_)0x016;

#define DECLARE_SOURCE_OPEN_VARS(enum_) \
	static enum_ const bad = (enum_)0x01;\
	static enum_ const text = (enum_)0x02;\
	static enum_ const binary = (enum_)0x04;

	DECLARE_BIT_MASK(open_mode_, open_mode);

} }

#endif 